package dao

import (
	"github.com/e421083458/gorm"
	"github.com/gin-gonic/gin"
)

//用于实名认证

type Iden struct {
	Id int `json:"id"`
	Uid int `json:"uid"`
	Realname string `json:"realname"`
	Mobile string `json:"mobile"`
}

func (t *Iden)FindIden(c *gin.Context, tx *gorm.DB,uid int)  int {

	var iden []Iden
	tx.Table("identity_auth").Where("uid = ? and status=1",uid).Find(&iden)
	if len(iden)==0{
		return 0
	}else{
		return 1
	}
}